package de.QuizCommunity.util;

import android.R;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.RatingBar;
import java.util.ArrayList;
import java.util.List;

import de.QuizCommunity.Bewertung_Ansehen;
import de.QuizCommunity.util.RatingBarAdapter;
import de.QuizCommunity.util.TextViewAdapter;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.GridView;
import android.widget.RatingBar;
import android.widget.TextView;

public class RatingBarAdapter extends BaseAdapter {
	private Context mContext;

	public RatingBarAdapter(Context c) {
		mContext = c;
	}

	public int getCount() {
		return mThumbIds.length;
	}

	public Object getItem(int position) {
		return null;
	}

	public long getItemId(int position) {
		return 0;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		RatingBar imageView;
		if (convertView == null) { // if it's not recycled, initialize some
									// attributes

			imageView = new RatingBar(mContext, null,
					R.attr.ratingBarStyleSmall);
			imageView.setLayoutParams(new GridView.LayoutParams(100, 100));

			imageView.setPadding(27, 27, 27, 27);
		} else {
			imageView = (RatingBar) convertView;
		}

		imageView.setNumStars(5);
		imageView.setStepSize((float) 0.5);
		return imageView;

	}

	private Integer[] mThumbIds = { R.drawable.star_off };
}
